headers of its own. Tweak xmalloc/xfree to new/delete. Regenerate deps.
jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h garmin_fs.h \
jeeps/gps.h xcsv_tokens.gperf
delbin.o: delbin.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \
- gbfile.h cet.h cet_util.h inifile.h session.h src/core/datetime.h
+ gbfile.h cet.h cet_util.h inifile.h session.h src/core/datetime.h \
+ src/core/xmltag.h
delgpl.o: delgpl.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \
gbfile.h cet.h cet_util.h inifile.h session.h src/core/datetime.h
destinator.o: destinator.cc defs.h config.h queue.h zlib/zlib.h \
jeeps/gps.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \
jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \
jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \
- jeeps/gpsproj.h src/core/file.h defs.h src/core/xmlstreamwriter.h
+ jeeps/gpsproj.h src/core/file.h defs.h src/core/xmlstreamwriter.h \
+ src/core/xmltag.h
grtcirc.o: grtcirc.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \
gbfile.h cet.h cet_util.h inifile.h session.h src/core/datetime.h \
grtcirc.h
jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \
jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \
jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \
- jeeps/gpsproj.h
+ jeeps/gpsproj.h src/core/xmltag.h
humminbird.o: humminbird.cc defs.h config.h queue.h zlib/zlib.h \
zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h session.h \
src/core/datetime.h
cet.h cet_util.h inifile.h session.h src/core/datetime.h csv_util.h
kml.o: kml.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h gbfile.h \
cet.h cet_util.h inifile.h session.h src/core/datetime.h xmlgeneric.h \
- grtcirc.h src/core/file.h defs.h src/core/xmlstreamwriter.h
+ grtcirc.h src/core/file.h defs.h src/core/xmlstreamwriter.h \
+ src/core/xmltag.h
lmx.o: lmx.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h gbfile.h \
cet.h cet_util.h inifile.h session.h src/core/datetime.h xmlgeneric.h
lowranceusr.o: lowranceusr.cc defs.h config.h queue.h zlib/zlib.h \
jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \
jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \
jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \
- jeeps/gpsproj.h
+ jeeps/gpsproj.h src/core/xmltag.h
tiger.o: tiger.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \
gbfile.h cet.h cet_util.h inifile.h session.h src/core/datetime.h \
csv_util.h
gbfile.h cet.h cet_util.h inifile.h session.h src/core/datetime.h
util.o: util.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h gbfile.h \
cet.h cet_util.h inifile.h session.h src/core/datetime.h \
- jeeps/gpsmath.h jeeps/gps.h jeeps/../defs.h jeeps/gpsport.h \
- jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \
- jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \
- jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \
- jeeps/gpsproj.h
+ src/core/xmltag.h jeeps/gpsmath.h jeeps/gps.h jeeps/../defs.h \
+ jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h \
+ jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h \
+ jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \
+ jeeps/gpsinput.h jeeps/gpsproj.h
util_crc.o: util_crc.cc
v900.o: v900.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h gbfile.h \
cet.h cet_util.h inifile.h session.h src/core/datetime.h
+validate.o: validate.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \
+ gbfile.h cet.h cet_util.h inifile.h session.h src/core/datetime.h \
+ filterdefs.h
vcf.o: vcf.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h gbfile.h \
cet.h cet_util.h inifile.h session.h src/core/datetime.h \
jeeps/gpsmath.h jeeps/gps.h jeeps/../defs.h jeeps/gpsport.h \
zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h session.h \
src/core/datetime.h xmlgeneric.h src/core/file.h defs.h
xmltag.o: xmltag.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \
- gbfile.h cet.h cet_util.h inifile.h session.h src/core/datetime.h
+ gbfile.h cet.h cet_util.h inifile.h session.h src/core/datetime.h \
+ src/core/xmltag.h
xol.o: xol.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h gbfile.h \
cet.h cet_util.h inifile.h session.h src/core/datetime.h xmlgeneric.h \
jeeps/gpsmath.h jeeps/gps.h jeeps/../defs.h jeeps/gpsport.h \
QString personal_note;
};
-typedef struct xml_tag {
- char* tagname;
- char* cdata;
- int cdatalen;
- char* parentcdata;
- int parentcdatalen;
- char** attributes;
- struct xml_tag* parent;
- struct xml_tag* sibling;
- struct xml_tag* child;
-} xml_tag ;
-
typedef void (*fs_destroy)(void*);
typedef void (*fs_copy)(void**, void*);
typedef void (*fs_convert)(void*);
format_specific_data* fs_chain_find(format_specific_data* chain, long type);
void fs_chain_add(format_specific_data** chain, format_specific_data* data);
-typedef struct fs_xml {
- format_specific_data fs;
- xml_tag* tag;
-} fs_xml;
-
-fs_xml* fs_xml_alloc(long type);
-
#define FS_GPX 0x67707800L
#define FS_AN1W 0x616e3177L
#define FS_AN1L 0x616e316cL
void set_waypt_count(unsigned int nc);
void waypt_add_url(waypoint* wpt, const QString& link,
const QString& url_link_text);
-void free_gpx_extras(xml_tag* tag);
void xcsv_setup_internal_style(const char* style_buf);
void xcsv_read_internal_style(const char* style_buf);
waypoint* find_waypt_by_name(const char* name);
/* this lives in gpx.c */
gpsbabel::DateTime xml_parse_time(const QString& cdatastr);
-xml_tag* xml_findfirst(xml_tag* root, const char* tagname);
-xml_tag* xml_findnext(xml_tag* root, xml_tag* cur, const char* tagname);
-char* xml_attribute(xml_tag* tag, const char* attrname);
-
char* rot13(const QString& str);
/*
*/
#include "defs.h"
+#include "src/core/xmltag.h"
+
#include <assert.h>
#define MYNAME "delbin"
static QXmlStreamReader* reader;
#include "src/core/file.h"
#include "src/core/xmlstreamwriter.h"
+#include "src/core/xmltag.h"
+
#include <QtCore/QRegExp>
#include <QtCore/QDateTime>
#include <QtCore/QDebug>
return;
}
- new_tag = (xml_tag*)xcalloc(sizeof(xml_tag),1);
+ new_tag = new xml_tag;
new_tag->tagname = xstrdup(CSTR(el));
attr_count = attr.size();
#include "defs.h"
#include "jeeps/gpsmath.h"
+#include "src/core/xmltag.h"
#include <ctype.h>
static gbfile* file_out;
#include "src/core/file.h"
#include "src/core/xmlstreamwriter.h"
+#include "src/core/xmltag.h"
// options
static char* opt_deficon = NULL;
--- /dev/null
+/*
+ Copyright (C) 2002-2013 Robert Lipe, gpsbabel.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+ */
+class xml_tag {
+ public:
+ xml_tag() :
+ tagname(NULL),
+ cdata(NULL),
+ cdatalen(0),
+ parentcdata(NULL),
+ parentcdatalen(0),
+ attributes(NULL),
+ parent(NULL),
+ sibling(NULL),
+ child(NULL) {}
+
+ char* tagname;
+ char* cdata;
+ int cdatalen;
+ char* parentcdata;
+ int parentcdatalen;
+ char** attributes;
+ struct xml_tag* parent;
+ struct xml_tag* sibling;
+ struct xml_tag* child;
+};
+
+xml_tag* xml_findfirst(xml_tag* root, const char* tagname);
+xml_tag* xml_findnext(xml_tag* root, xml_tag* cur, const char* tagname);
+char* xml_attribute(xml_tag* tag, const char* attrname);
+void free_gpx_extras(xml_tag* tag);
+
+typedef struct fs_xml {
+ format_specific_data fs;
+ xml_tag* tag;
+} fs_xml;
+
+fs_xml* fs_xml_alloc(long type);
#include "defs.h"
#include "jeeps/gpsmath.h"
+#include "src/core/xmltag.h"
#include <ctype.h>
static gbfile* file_out;
*/
#include "defs.h"
+#include "src/core/xmltag.h"
#include "jeeps/gpsmath.h"
#include <ctype.h>
#include <string.h>
#include "defs.h"
+#include "src/core/xmltag.h"
static void
free_xml_tag(xml_tag* tag)
}
next = tag->sibling;
- xfree(tag);
+ delete tag;
tag = next;
}
}